//
//  FrequentlyQuestionViewController.m
//  quxiangtao
//
//  Created by xbmios on 2018/7/20.
//  Copyright © 2018年 shanhaijin. All rights reserved.
//

#import "FrequentlyQuestionViewController.h"
#import "FrequentlyQuestionTableViewCell.h"
#import "FrequentlyQuestionModel.h"

@interface FrequentlyQuestionViewController ()
@property (nonatomic, strong) UIWebView *webView;
@end

@implementation FrequentlyQuestionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = WhiteColor;
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.title = @"帮助中心";
    [self.view addSubview:self.webView];
    NSURL *url = [NSURL URLWithString:@"http://aitaobang.haoyunkaikai.com/H5/about.html"];
    
    // 2. 把URL告诉给服务器,请求,从m.baidu.com请求数据
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    // 3. 发送请求给服务器
    [self.webView loadRequest:request];
    
}

#pragma mark -lazy
- (UIWebView *)webView {
    
    if (!_webView) {
        
        _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
        _webView.backgroundColor = Colorf2f2f2;
        _webView.scrollView.scrollEnabled = YES;
        _webView.scrollView.showsVerticalScrollIndicator = NO;
        _webView.scrollView.showsHorizontalScrollIndicator = NO;
        
        _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
        _webView.scrollView.scrollEnabled = YES;
        
        if (@available(iOS 11.0 , *)) {
            
            _webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
            
        }
        
    }
    
    return _webView;
}


#pragma mark -设置
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = NO;
}

- (void)viewWillDisappear:(BOOL)animated {
    
    [super viewWillDisappear:animated];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}



@end
